<template>
  <router-view />
</template>
<script lang="ts">
import { defineComponent, provide, ref } from "vue";
import router from "./router";

export default defineComponent({
  setup() {
    const width = document.documentElement.clientWidth;
    const menuVisible = ref(width >= 500 ? true : false);
    provide("menuVisible", menuVisible);
    if (width <= 500) {
      router.afterEach(() => {
        menuVisible.value = false;
      });
    }
  },
});
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
a {
  text-decoration: none;
  color: #2c3e50;
}
</style>
